package org.musicPlayerServer.business.object;

import java.io.File;

public class Content {

    protected File file;
    
    
    public Content(String file) {
	this.file = new File(file);
    }
    
    public String getFilePath() {
	return file.getAbsolutePath();
    }

    public String toHtml(String contextPath) {
	return "<a href=\""+contextPath+""+file.getAbsolutePath()+"\" >"+file.getName()+"</a>";
    }

    @Override
    public boolean equals(Object obj) {
	return getFilePath().equals(((Content)obj).getFilePath());
    }
    
    public File getFile(){
	return file;
    }
    
    
    
}
